import { defHttp } from '/@/utils/http/axios';

enum Api {
	loginfo = '/sys/loginfo',
	visitInfo = '/sys/visitInfo',
	activityListapi = '/activity/bsActiveItem/getGroupTypesByRedis',
	modifyUserTripByMainId = '/journey/bsTravelgroupTourorderrecord/modifyUserTripByMainId',
	updateHomePageTypeBigTeam = '/journey/bsTravelgroupMaintuortravellinerecord/updateHomePageTypeBigTeam',
	refund = '/journey/bsTravelgroupTourorderrecord/refund',
	complimentaryCouponByOrderId = '/journey/bsTravelgroupTourorderrecord/complimentaryCouponByOrderId',
}
/**
 * 日志统计信息
 * @param params
 */
export const getLoginfo = (params) => defHttp.get({ url: Api.loginfo, params }, { isTransformResponse: false });
export const getTypeList = (params) => defHttp.get({ url: Api.activityListapi, params }, { isTransformResponse: false });
/**
 * 访问量信息
 * @param params
 */
export const getVisitInfo = (params) => defHttp.get({ url: Api.visitInfo, params }, { isTransformResponse: false });

/**
 * 修改行程，为用户
 */
export const modifyUserTripByMainId = (params) => {
	return defHttp.post({ url: Api.modifyUserTripByMainId, params });
}
/**
 * 修改类别
 */
export const updateHomePageTypeBigTeam = (params) => {
	return defHttp.post({ url: Api.updateHomePageTypeBigTeam, params });
}
/**
 * 退款或取消行程
 */
export const refundOrCancelJounery = (params) => {
	return defHttp.post({ url: Api.refund, params });
}
/**
 * 赠送优惠券
 */
export const complimentaryCouponByOrderId = (params) => {
	return defHttp.post({ url: Api.complimentaryCouponByOrderId, params });
}